package com.ef.domain;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ef.constant.EDeferType;
import com.ef.constant.ELeadsSource;
import com.ef.constant.ELeadsStatus;
import com.ef.constant.ELeadsType;
import com.ef.constant.EStageType;
import com.ef.constant.StatusType;
import com.ef.util.CalendarUtil;

@Entity
public class Leads implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	@Enumerated(value = EnumType.STRING)
	private StatusType status = StatusType.VALID;

	@Column(length = 100)
	private String name;

	@Enumerated(value = EnumType.STRING)
	private ELeadsSource leadsSource;

	@Enumerated(value = EnumType.STRING)
	private ELeadsType leadsType;

	@Enumerated(value = EnumType.STRING)
	private ELeadsStatus leadsStatus;
	/**
	 * 尊称
	 */
	@Column(length = 50)
	private String salutation;

	@Column(length = 50)
	private String telephone;

	@Column(length = 50)
	private String mobileTelephone;

	@Column(length = 50)
	private String companyTelephone;
	/**
	 * 其他电话
	 */
	@Column(length = 50)
	private String otherTelephone;

	@Column(length = 100)
	private String company;

	@Column(length = 100)
	private String email;
	// cyg 100116
	@Column(length = 50)
	private String province;

	@Enumerated(value = EnumType.STRING)
	private EStageType stage;

	@Column(length = 100)
	private String city;
	// CYG 修改
	@Column(length = 50)
	private String age;

	@Column(length = 100)
	private String education;

	/**
	 * 首次出现时间,区别于showTime; 在数据导入时可能就已经产生.
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date initVisitTime;

	@ManyToOne(fetch = FetchType.LAZY)
	private MarketingPlan marketingPlan;

	@ManyToOne(fetch = FetchType.EAGER)
	private MarketingPolicy marketingPolicy;

	@ManyToOne(fetch = FetchType.EAGER)
	private AdChannel adChannel;

	@ManyToOne(fetch = FetchType.EAGER)
	private PTE pte;

	/**
	 * PTE 的Leader 是谁
	 */
	@ManyToOne(fetch = FetchType.EAGER)
	private PTE pteLeader;

	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;

	@ManyToOne(fetch = FetchType.LAZY)
	private User createUser;

	@Temporal(TemporalType.TIMESTAMP)
	private Date importTime;

	@ManyToOne(fetch = FetchType.LAZY)
	private User importUser;

	/**
	 * cyg 091218 系统维护一个,show的编号<br/>
	 * 同时出现的多人 使用一个show的编号<br/>
	 * 相应的的Show 操作允许使用 checkbox 进行多选.
	 */
	private String showCode;

	@Temporal(TemporalType.TIMESTAMP)
	private Date setApptTime;

	/**
	 * 首次出现的时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date showTime;
	/**
	 * 首次付钱
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date payTime;
	/**
	 * 最近的操作时间 指 Call或Demo
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastEventTime;

	/**
	 * 最近的操作记录 指 Call或Demo
	 */
	@Column(length = 1000)
	private String lastEventCommons;

	/**
	 * 级别,对应可以选择F2F的课程
	 */
	@ManyToOne(fetch =FetchType.EAGER)
	private ClassLevel currentlevel;
	/**
	 * 精英卡号
	 */
	private String eliteCard;
	/**
	 * 是否是VIP
	 */
	private Boolean isVIP = false;
	/**
	 * 是否需要判断网络课程
	 */
	private Boolean needJudgeNetLevel = false;
	/**
	 * 网络课程的初始级别
	 */
	private Integer netLevel = -1;

	private Integer netLevelUnit = -1;
	/**
	 * 网络级别变化的时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date changeNetLevelTime;
	/**
	 * 剩下的 Free F2F次数
	 */
	private Integer freeF2FCount = 0;

	@Temporal(TemporalType.TIMESTAMP)
	private Date originalClassTime;
	/**
	 * 是否完成了初始评级
	 */
	private Boolean finishedOriginalInterview = false;
	/**
	 * 课程取消的次数
	 */
	private Integer cancelTimes = 0;
	/**
	 * 本周课程取消的次数
	 */
	private Integer cancelTimesInWeek = 0;

	/**
	 * 取消时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastCancelTime;

	/**
	 * 缺课的次数
	 */
	private Integer absentTimes = 0;
	/**
	 * 本周缺课的次数
	 */
	private Integer absentTimesInWeek = 0;
	/**
	 * 课程类型
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	private Course course;

	/**
	 * 学生课程情况.<br/>
	 * 学生的课程情况在签订合同的时候确定.<br/>
	 * 但可以根据情况调整学生的课程.
	 */
	@ManyToMany(cascade = { CascadeType.ALL })
	private List<ClassUnit> classUnits;
	
	@Column(length =1000)
	private String comments;
	
	private Boolean isStudent = false;
	/**
	 * 是否需要进行惩罚
	 */
	private Boolean needPunish = false;

	@Temporal(TemporalType.TIMESTAMP)
	private Date punishStartTime;
	@Temporal(TemporalType.TIMESTAMP)
	private Date punishEndTime;

	@ManyToOne(fetch = FetchType.EAGER)
	private School school;

	@ManyToOne(fetch = FetchType.EAGER)
	private User tm;

	@Temporal(TemporalType.TIMESTAMP)
	private Date tmAssignTime;

	@ManyToOne(fetch = FetchType.EAGER)
	private User cc;

	@Temporal(TemporalType.TIMESTAMP)
	private Date ccAssignTime;

	@ManyToOne(fetch = FetchType.EAGER)
	private User cr;

	@Temporal(TemporalType.TIMESTAMP)
	private Date crAssignTime;

	/**
	 * 合同有效的时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date validStartTime;

	/**
	 * 合同有效结束时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date validEndTime;
	
	/**
	 * 正式有效开始时间,通过延期计算
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date trueValidStartTime;


	/**
	 * 正式有效结束时间,通过延期计算
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date trueValidEndTime;

	/**
	 * 推迟
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date deferStartTime;

	/**
	 * 推迟
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date deferEndTime;

	@Enumerated(value = EnumType.STRING)
	private EDeferType deferType;

	@ManyToOne(fetch = FetchType.LAZY)
	private User updateUser;

	@Temporal(TemporalType.TIMESTAMP)
	private Date updateTime;

	@Column(length = 500)
	private String showUpComments;
	
	@ManyToOne(fetch=FetchType.LAZY)
	private User showDealUser;
	
	private int tmCall = 0;//TM
	
	private int crCall = 0;//CR
	
	private int ccCall = 0;//CC
		
	
    /**
     * CYG100304
     * 下个任务的时间，用于查询筛选
     */
    private Date nextEventTime;
    
	/**
	 * CYG100319
	 * 通过team控制，lead的归属
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	private Team team;
	
	public Date getNextEventTime() {
		return nextEventTime;
	}

	public Team getTeam() {
		return team;
	}

	public void setTeam(Team team) {
		this.team = team;
	}

	public void setNextEventTime(Date nextEventTime) {
		this.nextEventTime = nextEventTime;
	}

	public User getShowDealUser() {
		return showDealUser;
	}

	public void setShowDealUser(User showDealUser) {
		this.showDealUser = showDealUser;
	}

	/**
	 * 判断学生是否有效
	 * 
	 * @param date
	 * @return
	 */
	public boolean isBookingValid(Date date) {
		if (deferStartTime != null && deferEndTime != null) {
			Date fd = CalendarUtil.getBeginOfDay(deferStartTime);
			Date ed = CalendarUtil.getEndOfDay(deferEndTime);
			// 在延期过程中
			if (!EDeferType.NetOnly.equals(deferType)) {
				if (fd.before(date) && ed.after(date)) {
					return false;
				}
			}
		}
		Date startDate=trueValidStartTime;
		Date endDate=trueValidEndTime;
		if(endDate==null){
			endDate=validEndTime;
		}
		if(startDate==null){
			startDate=validStartTime;
		}
		if (startDate != null && endDate != null) {
			Date fd = CalendarUtil.getBeginOfDay(startDate);
			Date ed = CalendarUtil.getEndOfDay(endDate);
			// 在合同内
			if (fd.before(date) && ed.after(date)) {
				return true;
			} else {
				return false;
			}
		}
		return false;
	}

	// /**
	// * 定金,为CC 提供 定金 功能?
	// */
	private Double deposit;
	//	
	@Temporal(TemporalType.TIMESTAMP)
	private Date depositTime;

	public int getTmCall() {
		return tmCall;
	}

	public void setTmCall(int tmCall) {
		this.tmCall = tmCall;
	}

	public int getCrCall() {
		return crCall;
	}

	public void setCrCall(int crCall) {
		this.crCall = crCall;
	}

	public int getCcCall() {
		return ccCall;
	}

	public void setCcCall(int ccCall) {
		this.ccCall = ccCall;
	}

	public PTE getPteLeader() {
		return pteLeader;
	}

	public void setPteLeader(PTE pteLeader) {
		this.pteLeader = pteLeader;
	}

	public PTE getPte() {
		return pte;
	}

	public void setPte(PTE pte) {
		this.pte = pte;
	}

	public MarketingPlan getMarketingPlan() {
		return marketingPlan;
	}

	public void setMarketingPlan(MarketingPlan marketingPlan) {
		this.marketingPlan = marketingPlan;
	}

	public Date getImportTime() {
		return importTime;
	}

	public void setImportTime(Date importTime) {
		this.importTime = importTime;
	}

	public User getImportUser() {
		return importUser;
	}

	public void setImportUser(User importUser) {
		this.importUser = importUser;
	}

	public String getShowCode() {
		return showCode;
	}

	public void setShowCode(String showCode) {
		this.showCode = showCode;
	}

	public Boolean getIsVIP() {
		if (isVIP != null) {
			return isVIP;
		} else {
			return false;
		}
	}

	public void setIsVIP(Boolean isVIP) {
		this.isVIP = isVIP;
	}

	public Integer getFreeF2FCount() {
		if (freeF2FCount != null) {
			return freeF2FCount;
		} else {
			return 0;
		}
	}

	public void setFreeF2FCount(Integer freeF2FCount) {
		this.freeF2FCount = freeF2FCount;
	}

	public Boolean getFinishedOriginalInterview() {
		if (finishedOriginalInterview != null) {
			return finishedOriginalInterview;
		} else {
			return false;
		}
	}

	public void setFinishedOriginalInterview(Boolean finishedOriginalInterview) {
		this.finishedOriginalInterview = finishedOriginalInterview;
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	public Date getTmAssignTime() {
		return tmAssignTime;
	}

	public void setTmAssignTime(Date tmAssignTime) {
		this.tmAssignTime = tmAssignTime;
	}

	public Date getCcAssignTime() {
		return ccAssignTime;
	}

	public void setCcAssignTime(Date ccAssignTime) {
		this.ccAssignTime = ccAssignTime;
	}

	public User getTm() {
		return tm;
	}

	public void setTm(User tm) {
		this.tm = tm;
	}

	public User getCc() {
		return cc;
	}

	public void setCc(User cc) {
		this.cc = cc;
	}

	public User getCr() {
		return cr;
	}

	public void setCr(User cr) {
		this.cr = cr;
	}

	public Date getCrAssignTime() {
		return crAssignTime;
	}

	public void setCrAssignTime(Date crAssignTime) {
		this.crAssignTime = crAssignTime;
	}

	public String getEliteCard() {
		if (eliteCard == null) {
			return "";
		}
		return eliteCard;
	}

	public void setEliteCard(String eliteCard) {
		this.eliteCard = eliteCard;
	}

	public Integer getCancelTimesInWeek() {
		if (cancelTimesInWeek != null) {
			return cancelTimesInWeek;
		} else {
			return 0;
		}

	}

	public void setCancelTimesInWeek(Integer cancelTimesInWeek) {
		this.cancelTimesInWeek = cancelTimesInWeek;
	}

	public void addCancelTimesInWeek() {
		if (cancelTimes != null) {
			this.cancelTimes++;
		} else {
			cancelTimes = 1;
		}
		if (cancelTimesInWeek != null) {
			this.cancelTimesInWeek++;
		} else {
			cancelTimesInWeek = 1;
		}

	}

	public Boolean isStudent() {
		if (isStudent != null) {
			return isStudent;
		} else {
			return false;
		}
	}

	public void setStudent(Boolean isStudent) {
		this.isStudent = isStudent;
	}

	/**
	 * @return
	 */
	public Boolean isNeedPunish(Date date) {
		if (needPunish != null && needPunish) {// 要惩罚
			if (punishStartTime != null && punishEndTime != null) {
				Date cdate=CalendarUtil.getMiddleOfDay(date);
				Date fd = CalendarUtil.getBeginOfDay(punishStartTime);
				Date ed = CalendarUtil.getEndOfDay(punishEndTime);
				// 在惩罚
				if (fd.before(cdate) && ed.after(cdate)) {
					return true;
				} else {
					return false;
				}
			} else {// 没时间
				return true;
			}
		}
		return false;
	}

	public void setNeedPunish(Boolean needPunish) {
		this.needPunish = needPunish;
	}

	public Boolean isNeedJudgeNetLevel() {
		if (needJudgeNetLevel != null) {
			return needJudgeNetLevel;
		} else {
			return false;
		}
	}

	public void setNeedJudgeNetLevel(Boolean needJudgeNetLevel) {
		this.needJudgeNetLevel = needJudgeNetLevel;
	}

	public Integer getNetLevel() {
		if (netLevel != null) {
			return netLevel;
		} else {
			return -1;
		}
	}

	public void setNetLevel(Integer netLevel) {
		this.netLevel = netLevel;
	}

	public Integer getNetLevelUnit() {
		if (netLevelUnit != null) {
			return netLevelUnit;
		} else {
			return -1;
		}
	}

	public void setNetLevelUnit(Integer netLevelUnit) {
		this.netLevelUnit = netLevelUnit;
	}

	public List<ClassUnit> getClassUnits() {
		return classUnits;
	}

	public void setClassUnits(List<ClassUnit> classUnits) {
		this.classUnits = classUnits;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSalutation() {
		return salutation;
	}

	public void setSalutation(String salutation) {
		this.salutation = salutation;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getEducation() {
		return education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	public MarketingPolicy getMarketingPolicy() {
		return marketingPolicy;
	}

	public void setMarketingPolicy(MarketingPolicy marketingPolicy) {
		this.marketingPolicy = marketingPolicy;
	}

	public ELeadsSource getLeadsSource() {
		return leadsSource;
	}

	public void setLeadsSource(ELeadsSource leadsSource) {
		this.leadsSource = leadsSource;
	}

	public ELeadsType getLeadsType() {
		return leadsType;
	}

	public void setLeadsType(ELeadsType leadsType) {
		this.leadsType = leadsType;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public User getCreateUser() {
		return createUser;
	}

	public void setCreateUser(User createUser) {
		this.createUser = createUser;
	}

	public Date getShowTime() {
		return showTime;
	}

	public void setShowTime(Date showTime) {
		this.showTime = showTime;
	}

	public Date getLastEventTime() {
		return lastEventTime;
	}

	public void setLastEventTime(Date lastEventTime) {
		this.lastEventTime = lastEventTime;
	}

	public String getLastEventCommons() {
		return lastEventCommons;
	}
	static private SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm");
	public String getLastEventCommonsByTm() {
		String next="";
		if (this.nextEventTime!=null){
			next="[TODO:"+df.format(nextEventTime)+"]";
		}
		if (lastEventCommons==null){
			return next;
		}else{
			return lastEventCommons+next;
		}
	}
	public void setLastEventCommons(String lastEventCommons) {
		this.lastEventCommons = lastEventCommons;
	}

	public ELeadsStatus getLeadsStatus() {
		return leadsStatus;
	}

	public void setLeadsStatus(ELeadsStatus leadsStatus) {
		if (this.setApptTime == null && this.leadsStatus != null
				&& !this.leadsStatus.equals(ELeadsStatus.SetAppt)
				&& leadsStatus.equals(ELeadsStatus.SetAppt)) {
			this.setApptTime = new Date();
		}
		this.leadsStatus = leadsStatus;
	}

	public StatusType getStatus() {
		return status;
	}

	public void setStatus(StatusType status) {
		this.status = status;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public AdChannel getAdChannel() {
		return adChannel;
	}

	public void setAdChannel(AdChannel adChannel) {
		this.adChannel = adChannel;
	}

	public School getSchool() {
		return school;
	}

	public void setSchool(School school) {
		this.school = school;
	}

	public String getMobileTelephone() {
		if (mobileTelephone == null)
			return "";
		return mobileTelephone;
	}

	public void setMobileTelephone(String mobileTelephone) {
		this.mobileTelephone = mobileTelephone;
	}

	public Date getChangeNetLevelTime() {
		return changeNetLevelTime;
	}

	public void setChangeNetLevelTime(Date changeNetLevelTime) {
		this.changeNetLevelTime = changeNetLevelTime;
	}

	public ClassLevel getCurrentlevel() {
		return currentlevel;
	}

	public void setCurrentlevel(ClassLevel currentlevel) {
		this.currentlevel = currentlevel;
	}

	public Date getValidStartTime() {
		return validStartTime;
	}

	public void setValidStartTime(Date validStartTime) {
		this.validStartTime = validStartTime;
	}

	public Date getValidEndTime() {
		return validEndTime;
	}

	public void setValidEndTime(Date validEndTime) {
		this.validEndTime = validEndTime;
	}

	public Integer getCancelTimes() {
		if (cancelTimes != null) {
			return cancelTimes;
		} else {
			return 0;
		}
	}

	public void setCancelTimes(Integer cancelTimes) {
		this.cancelTimes = cancelTimes;
	}

	public Integer getAbsentTimes() {
		if (absentTimes != null) {
			return absentTimes;
		} else {
			return 0;
		}
	}

	public void setAbsentTimes(Integer absentTimes) {
		this.absentTimes = absentTimes;
	}

	public Integer getAbsentTimesInWeek() {
		if (absentTimesInWeek != null) {
			return absentTimesInWeek;
		} else {
			return 0;
		}

	}

	public void setAbsentTimesInWeek(Integer absentTimesInWeek) {
		this.absentTimesInWeek = absentTimesInWeek;
	}

	public String getCompanyTelephone() {
		return companyTelephone;
	}

	public void setCompanyTelephone(String companyTelephone) {
		this.companyTelephone = companyTelephone;
	}

	public String getOtherTelephone() {
		return otherTelephone;
	}

	public void setOtherTelephone(String otherTelephone) {
		this.otherTelephone = otherTelephone;
	}

	public Date getSetApptTime() {
		return setApptTime;
	}

	public void setSetApptTime(Date setApptTime) {
		this.setApptTime = setApptTime;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public Date getInitVisitTime() {
		return initVisitTime;
	}

	public void setInitVisitTime(Date initVisitTime) {
		this.initVisitTime = initVisitTime;
	}

	public Double getDeposit() {
		return deposit;
	}

	public void setDeposit(Double deposit) {
		this.deposit = deposit;
	}

	public Date getDepositTime() {
		return depositTime;
	}

	public void setDepositTime(Date depositTime) {
		this.depositTime = depositTime;
	}

	public EStageType getStage() {
		return stage;
	}

	public void setStage(EStageType stage) {
		this.stage = stage;
	}

	public Date getOriginalClassTime() {
		return originalClassTime;
	}

	public void setOriginalClassTime(Date originalClassTime) {
		this.originalClassTime = originalClassTime;
	}

	public Date getPunishStartTime() {
		return punishStartTime;
	}

	public void setPunishStartTime(Date punishStartTime) {
		this.punishStartTime = punishStartTime;
	}

	public Date getPunishEndTime() {
		return punishEndTime;
	}

	public void setPunishEndTime(Date punishEndTime) {
		this.punishEndTime = punishEndTime;
	}

	public Date getDeferStartTime() {
		return deferStartTime;
	}

	public void setDeferStartTime(Date deferStartTime) {
		this.deferStartTime = deferStartTime;
	}

	public Date getDeferEndTime() {
		return deferEndTime;
	}

	public void setDeferEndTime(Date deferEndTime) {
		this.deferEndTime = deferEndTime;
	}

	public Date getLastCancelTime() {
		return lastCancelTime;
	}

	public void setLastCancelTime(Date lastCancelTime) {
		this.lastCancelTime = lastCancelTime;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	public Boolean getIsStudent() {
		if (isStudent != null) {
			return isStudent;
		} else {
			return false;
		}
	}

	public void setIsStudent(Boolean isStudent) {
		this.isStudent = isStudent;
	}

	public Boolean getNeedJudgeNetLevel() {
		return needJudgeNetLevel;
	}

	public Boolean getNeedPunish() {
		return needPunish;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public User getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(User updateUser) {
		this.updateUser = updateUser;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getShowUpComments() {
		return showUpComments;
	}

	public void setShowUpComments(String showUpComments) {
		this.showUpComments = showUpComments;
	}

	public EDeferType getDeferType() {
		return deferType;
	}

	public void setDeferType(EDeferType deferType) {
		this.deferType = deferType;
	}

	public Date getTrueValidEndTime() {
		return trueValidEndTime;
	}

	public void setTrueValidEndTime(Date trueValidEndTime) {
		this.trueValidEndTime = trueValidEndTime;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public Date getTrueValidStartTime() {
		return trueValidStartTime;
	}

	public void setTrueValidStartTime(Date trueValidStartTime) {
		this.trueValidStartTime = trueValidStartTime;
	}
	
	public String getBookingInfo(){
		String info="";
		if (name!=null&&name.trim().length()>0){
			info=name.trim();
		}
		if (this.eliteCard!=null&&eliteCard.trim().length()>0){
			info=info+"["+eliteCard.trim()+"]";
		}
		if (this.getCurrentlevel()!=null){
			info=info+"["+getCurrentlevel().getName()+"]";
		}
		return info;
	}
	
	public String getTelInfo(){
		String tel="";
		if (this.mobileTelephone!=null&&mobileTelephone.trim().length()>0){
			tel=this.mobileTelephone;
		};
		if (this.telephone!=null&&telephone.trim().length()>0){
			tel=tel+" "+this.telephone;
		};
		if (this.companyTelephone!=null&&companyTelephone.trim().length()>0){
			tel=tel+" "+this.companyTelephone;
		};
		if (this.otherTelephone!=null&&otherTelephone.trim().length()>0){
			tel=tel+" "+this.otherTelephone;
		};
		return tel;
	}
}
